#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
void* My_memmove(void* arr1, const void* arr2,char x)
{
	assert(arr1 && arr2);
	if (arr1 < arr2)
	{
		for (int i = 0; i < x; i++)
		{
			((char*)arr1)[i] = ((char*)arr2)[i];
		}
	}
	else
	{
		x--;
		while (x>=0)
		{
			((char*)arr1)[x] = ((char*)arr2)[x];
			x--;
		}
	}
	return ((char*)arr1);
}
int main()
{
	int arr[] = { 0,1,2,3,4,5,6,7,8,9 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	My_memmove(arr + 2, arr,20);
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}